<template>
    <div style="height:100%;width:100%;">
        <div class="retrieval">
            <div class="retrieval-title youba-primary-grey">验证企业信息</div>
            <div class="retrieval-group">
                <group>
                    <mu-input class="retrieval-input" label="联系人姓名" v-model="name" label-class="retrieval-input-label" type="text" placeholder="请输入联系人姓名"></mu-input>
                </group>
            </div>
            <div class="retrieval-btn">
                <x-button @click.native="next">下一步</x-button>
            </div>
        </div>
    </div>
</template>

<script>
    import {mapState} from 'vuex'
    import {mapMutations} from 'vuex'
    import VUEX_NAME from '../../store/constants.vue'
    import Vue from 'vue'
    import {
        MInput
    } from 'muka-ui'
    import {
        XButton,
        PopupRadio,
        Group
    } from 'vux'
    export default {
        name: 'hello',
        components: {
            'mu-input': MInput,
            XButton,
            PopupRadio,
            Group
        },
        data: function () {
            return {
                name: '',
                show: true,
                select: 1,
                verify: '',
                options: [{
                    key: 1,
                    value: '个人'
                }, {
                    key: 2,
                    value: '企业'
                }]
            }
        },
        created: function () {

        },
        computed: mapState([
            VUEX_NAME.findPwdObj,
        ]),
        methods: {
            ...mapMutations([
                VUEX_NAME.updateFindPwdObj,
            ]),
            next: function () {
                if (this.name === '') {
                    this.$vux.toast.show({
                        text: '请输入联系人姓名',
                        type: 'text',
                        position: 'middle'
                    })
                    return
                }
                this.$ajax(
                    'resetPwdThree',
                    {
                        contactName: this.name,
                        verifySessionId: this.findPwdObj.verifySessionId
                    },
                    (content) => {
                        this.$router.push('/retrieval4')
                    }, true)
            }
        }
    }

</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style>


</style>
